package Spil;

import desktop_resources.GUI;

public class Player {
	
	private String Name;
	private int fieldNumber;
	private int fleetsOwned;
	private int campOwned;

	public Account bank = new Account(30000);
	
	public Player(String Name, int start) {
		this.Name = Name;
		this.fieldNumber = start;
		this.fleetsOwned = 0;
	}

	public void addBalance(int money) {
		bank.addBalance(money);
		GUI.setBalance(this.Name, bank.getBalance());	
	}

	public void addFieldNumber(int diceRoll) {
		this.fieldNumber = this.fieldNumber + diceRoll;

		if (this.fieldNumber > 23)
			this.fieldNumber = this.fieldNumber - 22;
		else if (this.fieldNumber == 23)
			this.fieldNumber = 1;
	}

	public String toString() {
		return this.Name;
	}

	public int getFieldNumber() {
		return this.fieldNumber;
	}

	public void addFleetsOwned() {
		this.fleetsOwned++;
	}

	public int getFleetsOwned() {
		return this.fleetsOwned;
	}

	public void addCampsOwned() {
		this.campOwned++;
	}

	public int getCampsOwned() {
		return this.campOwned;
	}

	
}
